window.onload = function ()
{

    var img = document.createElement('img');
    img.src = '/images/panier_carottes.png';
    img.onclick = planterCarottes;

    var img2 = document.createElement('img');
    img2.src = '/images/panier-mais.png';

    var img3 = document.createElement('img');
    img3.src = '/images/panier_tomates.png';

    var img4 = document.createElement('img');
    img4.src = '/images/panier_ble.png';

    document.getElementById('paniers').appendChild(img);
    document.getElementById('paniers').appendChild(img2);
    document.getElementById('paniers').appendChild(img3);
    document.getElementById('paniers').appendChild(img4);
}

function planterCarottes() {

    var carotte1 = new Image();
    carotte1.src = '/images/plantation/carottes/carotte-1.png';

    console.log("clicker sur panier carottes");
    document.getElementById('paniers').appendChild(carotte1);




}

